<?php

namespace App\Admin\Actions\Stock;

use Encore\Admin\Actions\Action;
use Illuminate\Http\Request;

class Export extends Action
{
    public $name = '导出库存';

    protected $selector = '.export-stock-post';

    public function handle(Request $request)
    {
        return $this->response()->success('正在导出！');
    }

    public function html()
    {
        $prefix = config('admin.route.prefix');
        return <<<HTML
<a href="$prefix/stock/export" target="_blank" class="btn btn-sm btn-default export-stock-post" title="导出库存"><i class="fa fa-download"></i><span class="hidden-xs">导出库存</span></a>
HTML;
    }

}
